home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir28
/
papc20.zip
/
TEST.PRG
< prev
Wrap
Text File
|
1994-04-03
|
2KB
|
183 lines
LBL test1
2
2
+
PUTS "\nresult is"
10 PUTX
PUTS "\n"
END
LBL test2
PROMPT "Enter a number 1, 2, or 3, or CR to exit: "
; next line executed if just a CR is entered
GTO done
; here if a number was entered
1 <
GTO error
3 >
GTO error
JMP
GTO one
GTO two
GTO three
LBL error
PUTS " You didn't follow instructions\n"
GTO test2
LBL one
PUTS " You entered 1\n"
GTO test2
LBL two
PUTS " You entered 2\n"
GTO test2
LBL three
PUTS " You entered 3\n"
GTO test2
LBL done
PUTS " You entered a CR\n"
END
LBL test3
100
1
STO
200
1
STO+ ; note this is two instructions not one
END
LBL test4
PUTS "Calling subroutine SUB1\n"
XEQ sub1
PUTS "Back in main\n"
RTN
LBL sub1
PUTS "Now in subroutine SUB1\n"
END
LBL test5
PUTS "About to Pause\n"
PAUSE
PUTS "OK\n"
END
LBL test6
PUTS "About to STOP, enter RUN to continue\n"
STOP
PUTS "You just entered RUN\n"
END
LBL test7
5 fix
CLRG
CLST
10.00001 0 STO ; block control word to loop 10 times incrementing by 1
0 ; put 0 on stack
LBL loop7
1+
0 RCL 0 PUTX DROP PUTS "\n" ; show bcw
0 DSE
GTO loop7
RTN
END
LBL test8
5 fix
CLRG
CLST
0.00902 0 STO ; block control word to loop 5 times incrementing by 2
0 ; put 0 on stack
LBL loop8
1+
0 RCL 0 PUTX DROP PUTS "\n" ; show bcw
0 ISG
GTO loop8
RTN
END
LBL test9
3 FS
3 FS?
GTO 9a
GTO 9e
;
LBL 9a
PUTS "Flag 3 was set\n"
3 FC
3 FC?
GTO 9b
GTO 9e
;
LBL 9b
PUTS "Flag 3 was clear\n"
3 FS
3 FS?C
GTO 9c
GTO 9e
;
LBL 9c
PUTS "Flag 3 was set, and is now clear\n"
3 FC?C
GTO 9d
GTO 9e
;
LBL 9d
PUTS "Flag 3 was clear, and is now clear\n"
RTN
;
LBL 9e
PUTS "Error\n"
END
LBL test10
100
101 <
GTO 10a
GTO 10f
;
LBL 10a
PUTS "100 is less than 101\n"
99 <
GTO 10f
PUTS "100 is not less than 99\n"
100 ==
GTO 10b
GTO 10f
;
LBL 10b
PUTS "100 is equal to 100\n"
99 >
GTO 10c
GTO 10f
;
LBL 10c
PUTS "100 is greater than 99\n"
101 >
GTO 10f
PUTS "100 is not greater than 101\n"
100 <=
GTO 10d
GTO 10f
;
LBL 10d
PUTS "100 is <= 100\n"
100 >=
GTO 10e
GTO 10f
;
LBL 10e
PUTS "100 is >= 100\n"
RTN
;
LBL 10f
PUTS "error\n"
END
LBL test11
1 2 3 4 5 6 7 8 9 10
010.01901 0 sto
0 stom
shows
0 rclm
shows
END